import { reqbannerlist } from '../../request/api'
const state = {
    list: []
}

const getters = {
    list(state) {
        return state.list
    }
}

const mutations = {
    changeList(state, list) {
        state.list = list
    }
}

const actions = {
    reqList({ commit }) {
        reqbannerlist().then(res => {
            // console.log(res);
            let list = res.data.list ? res.data.list : []
            commit('changeList',list)
        })
    }
}

export default {
    state,
    getters,
    mutations,
    actions,
    namespaced: true
}